﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace synoexec.synoexec.synologylib.Helpers
{
    public static class TextHelper
    {
        /// <summary>
        /// 十六进制格式展示
        /// </summary>
        public static string ToHex(string text)
        {
            byte[] byteArray = Convert.FromBase64String(Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)));
            string hex = BitConverter.ToString(byteArray).Replace("-", string.Empty);
            return hex.ToLower();
        }
    }
}
